package demon1;

/**
 * @euthor 3133
 */

/*class A extends Cal {

    public void func()
    {
        System.out.println(super.a);
    }
}*/
class Animal{
    public String name;

    public int age;


    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void eat()
    {
        System.out.println(this.name+"正在吃饭");

    }
}//共性继承

/**
 *
 */
class DOg extends Animal{
    public DOg() {
        super("yuanyuan", 188);
        System.out.println(12);
    }

    public DOg(String name, int age) {
        super(name, age);
    }


    public void bark()
    {
        System.out.println(this.name+ "正在叫");
    }
}
class Cat extends Animal{

    public Cat(String name, int age) {
        super(name, age);
    }

    public void  mioamiao()
    {
        System.out.println(this.name+"miaomiao");
    }
}

public class Test {
    public class  Cal {

        protected int  a=20;


    }
protected int a=20;
    public static void main(String[] args)
    {


    }
}
